package com.springstudy.service.impl;


import com.springstudy.mapper.UserMapper;
import com.springstudy.pojo.User;
import com.springstudy.service.UserService;

import java.util.List;

/**
 * @author Tamako
 * @since 2024/12/30 16:52
 */
public class UserServiceImpl implements UserService {
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
    //    private UserDao userDao;
//
//    private String username;

//    private List<String> stringList;
//    private List<UserDao> userDaoList;
//
//    private Set<String> stringSet;
//    private Set<UserDao> userDaoSet;
//
//    private Map<String, UserDao> map;
//
//    private Properties properties;

//    public void init() {
//        System.out.println("UserServiceImpl.init...");
//    }
//
//    public void destroy() {
//        System.out.println("UserServiceImpl.destroy...");
//    }

//    public UserServiceImpl() {
//        System.out.println("UserServiceImpl created");
//    }

//    public void setUserDao(UserDao userDao) {
//        System.out.println("UserServiceImpl.userDao = " + userDao);
//        this.userDao = userDao;
//    }
//
//    public void setUsername(String username) {
//        this.username = username;
//    }

    //
//    public void setStringList(List<String> stringList) {
//        this.stringList = stringList;
//    }
//
//    public void setUserDaoList(List<UserDao> userDaoList) {
//        this.userDaoList = userDaoList;
//    }
//
//    public void setStringSet(Set<String> stringSet) {
//        this.stringSet = stringSet;
//    }
//
//    public void setUserDaoSet(Set<UserDao> userDaoSet) {
//        this.userDaoSet = userDaoSet;
//    }
//
//    public void setMap(Map<String, UserDao> map) {
//        this.map = map;
//    }
//
//    public void setProperties(Properties properties) {
//        this.properties = properties;
//    }

    @Override
    public void show() {
        List<User> all = userMapper.findAll();
        for (User user : all) {
            System.out.println(user);
        }
//        System.out.println("UserServiceImpl.userDao = " + userDao);
//        System.out.println("UserServiceImpl.stringList = " + stringList);
//        System.out.println("UserServiceImpl.userDaoList = " + userDaoList);
//        System.out.println("UserServiceImpl.stringSet = " + stringSet);
//        System.out.println("UserServiceImpl.userDaoSet = " + userDaoSet);
//        System.out.println("UserServiceImpl.map = " + map);
//        System.out.println("UserServiceImpl.properties = " + properties);
    }

//    @Override
//    public void afterPropertiesSet() throws Exception {
//        System.out.println("UserServiceImpl.afterPropertiesSet...");
//    }

//    @Override
//    public void setServletContext(ServletContext servletContext) {
//        System.out.println(servletContext);
//    }
//
//    @Override
//    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
//        System.out.println(applicationContext);
//    }
//
//    @Override
//    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
//        System.out.println(beanFactory);
//    }
//
//    @Override
//    public void setBeanName(String name) {
//        System.out.println(name);
//    }
}
